<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Keywords" content="惠信钱包，金融">
<meta name="description" content="描述描述描述" />
<%@include file="/WEB-INF/base/commRoot.jsp"%>
<link rel="stylesheet" href="/css/public.css" />
<link rel="stylesheet" href="/css/style.css" />
<script type="text/javascript" src="/js/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="/js/jquery.validate.js"></script>
<link rel="stylesheet" href="/css/validate/screen.css">
<script type="text/javascript" src="/js/win_layer/win_layer.js"></script>
<script type="text/javascript" src="/js/view/account/sms.js"></script>
<script type="text/javascript" src="/js/view/fundRecord/todo_money.js"></script>

<title>转账</title>
<script type="text/javascript">
		
		function checkBindThing(){
			var alertStr="您好，在惠信钱包转账，需要先通过绑定手机号、实名认证、设置支付密码。目前您账户";
			var str=alertStr;
			if('<s:property value="#request.cash"/>'==0.00){
				fobiddenOnclick();
			}if('<s:property value="#request.nohaveTele"/>'=="ok"){
				alertStr+="还未绑定手机号";
			}
			if('<s:property value="#request.isNeedApprove"/>'=='ok'){
	            if(alertStr!=str){
	            	alertStr+="、实名认证";
				}else{
					alertStr+="还未实名认证";
				}
			}if('<s:property value="#request.nohavepassword"/>'=='ok'){
				if(alertStr==str){
					alertStr+="还未设置支付密码";
				}else if(alertStr.indexOf("还未绑定手机号")>0&&'<s:property value="#request.isNeedApprove"/>'!='ok'){
					alertStr=str+"还未绑定手机号和设置支付密码";
				}else{
					alertStr+="和设置支付密码";
				}
			}if(alertStr!=str){
				fobiddenOnclick();
				layer.alert(alertStr+"[请点击确定进入安全中心设置]",8,function(){
					location.href = ctx_root+'/account/safeAction_safe.action';
			    });
		    }
			if('<s:property value="#request.isNeedWithdraw"/>'=="ok" &'<s:property value="#request.limitWithdrawCount"/>'!=null){
				var limitWithdrawCount='<s:property value="#request.limitWithdrawCount"/>';
				layer.alert("为防止恶意套现,成功提现"+limitWithdrawCount+"次后才可以转账",8);
			}
			
		}
		
		function fobiddenOnclick(){
			$('#totransfer').removeClass('btn');
			$('#totransfer').addClass('grey_btn');
			$("#totransfer").unbind("click");
			tflag=false;
		}
</script>
</head>
<body onload="checkBindThing()">
	<!--header-->
	<%@include file="/head.jsp"%>
	<!--/header-->
	<!--main-->
	<div class="main_bg">
		<div class="money_operat">
<!-- 			<h3> -->
<!-- 				<a href="javascript:void(0)" onclick="history.back()" class="return v">返回</a> <em class="v">转账</em> -->
<!-- 				<span class="line v"></span> -->
<!-- 			</h3> -->
			<ul class="money_operat_list">
				<li class="clearfix"><label>输入朋友的惠信号：</label><input
					type="text" class="input v"
					 placeholder="输入对方惠信号"
					onblur="checkAccName('accName',this.value)" id="accname" onkeydown="clearAccnameMsg()"/>&nbsp;&nbsp;&nbsp;&nbsp;
					<span id="accnameMsg" class="icon_fail v" style="color:red;display:none;"></span></li>
				    <li class="clearfix text_sp"><label>朋友真实姓名：</label><span id="nameMsg" class="icon_fail v" style="color:red;display:none;"></span><span id="name">***</span><s:hidden
						id="otherUserId"></s:hidden></li>
				<li class="clearfix text_sp"><label>预计到账时间：</label><span>实时</span></li>
				<li class="clearfix text_sp"><label>钱包余额：</label><span>
						<s:if test="#request.cash!=null and #request.cash!=''">
							<s:text name="global.format.money">
								  <s:param value="@com.hx.qb.common.util.StringUtils@moneyToKeepDecimals(#request.cash,2)"></s:param>
							</s:text>
						</s:if>
						<s:else>0.00</s:else>
				</span>元
				 
				 <s:hidden id="nohavepassword" name="#request.nohavepassword"></s:hidden> 
				 <s:hidden id="cash" name="#request.cash"></s:hidden> 
				 <s:hidden id="isNeedApprove" name="#request.isNeedApprove"></s:hidden> 
				 <s:hidden id="singleTransferAmount" name="#request.userFundsOb.singleTransferAmount"></s:hidden>
				 <s:hidden id="safepaySwitchStatus" name="#request.userFundsOb.safepaySwitchStatus"></s:hidden>
			     <s:hidden id="safePayAmount" name="#request.userFundsOb.safePayAmount"></s:hidden>
			     <s:hidden id="nohaveTele" name="#request.nohaveTele"></s:hidden>
			     <s:hidden id="systransferFeeRate" name="#request.systransferFeeRate.dataValue"></s:hidden>
			     <s:hidden id="userId" name="#request.userOb.userId"></s:hidden>
			     <s:hidden id="limitTranMoney" name="#request.sysTopMoney.dataValue"></s:hidden>
			     
				<li class="clearfix"><label>转账金额：</label><input type="text"
					placeholder="输入转账金额" id="transferamount"
					onkeyup="transfercalculate(this.value)" name="" class="input v" />&nbsp;&nbsp;元&nbsp;&nbsp;<span
					id="transferamountMsg" class="icon_fail v" style="color:red;display:none;"></span></li>
				<li class="clearfix"><label>支付密码：</label><input type="password"
					placeholder="输入支付密码" id="paypassword" name="" class="input v" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span
					class="icon_fail v" id="paypasswordMsg" style="color:red;display:none;"></span></li>
 
				<li><a href="javascript:void(0);" class="btn" id="totransfer" onclick="sureTransfer(1)">确认转账</a></li>
			</ul>
		</div>


        <!--输入转账金额超出设定范围输入手机验证码 -->
		<div id="transferPaySms" class="popup dis_no" style=" width:740px; margin-left:-245px; display:none;" onMouseDown="moveEvent(event,this.id)">
			<h3><span>支付手机验证码</span><a href="javascript:void(0);" class="close"></a></h3>
		    <ul class="pop_modify" id="transferPaySmsUl">
		    	<li class='clearfix'>
			    	<div class="clearfix">
			    	<label class='tit'>验证码发送手机：</label>
			    	<input  type='text' readonly='readonly'  class='input l' value='<s:property value="#request.userOb.mobile.substring(0,3)"/>****<s:property value="#request.userOb.mobile.substring(#request.userOb.mobile.length()-4,#request.userOb.mobile.length())"/>'/>
			    	</div>
		    	</li>
		    	<li class='clearfix'><div class="clearfix">
		    	    <label class='tit'>验证码：</label>
			    	<input name='' id='transferPaySmsCode' type='text' class='input l' onblur="removeEvent()"  maxlength="6" style="width:120px;">
			    	<a class='send l' id="transferPaySmsSend" href='javascript:void(0);' onclick="sendMsg('<s:property value="#request.userOb.userId"/>','transferPaySmsCode','transferPaySmsSend');">免费获取验证码</a>
			    	<span class="icon_fail" id="transferPaySmsMsg" style="display: inline-block;background-position: 0 -78px; line-height:38px; padding-left: 16px;margin-left: 10px;"></span>
			    	</div>
			    	<p style="padding:4px 0 0 190px; color:#888;">(手机验证码是6位数字,5分钟内输入有效,请勿泄露)</p>
		    	</li>
		    </ul>
		    <div class="popup_bottom">
		      <a href="javascript:void(0);" class="btn"  onclick="sureTransfer(2,'')">确定</a>
		    </div>
        </div>
        <div id="transferPaySmsD" class="pop_up_bg dis_no"></div>
	</div>
	<!--/main-->
	<!--footer-->
	<%@include file="/footer.jsp"%>
</body>
</html>
